package cn.qq.xiangmu.test;

import cn.qq.xiangmu.entity.*;

public class Demo {
    public static void main(String[] args) {
        Dog dog = new Dog("欧欧",100,0,"德国牧羊犬");
        Penguin penguin = new Penguin("美美",100,0,Penguin.SEX_FMALE);
        Dog dog1=new Dog();
        dog.setHealth(120);//封装
        dog.print();
        dog1.print();
        penguin.print();
    }
}
